package com.android.launcherplus;

import android.content.Context;
import android.content.SharedPreferences;

//Xiong@2011.12.21:  merge

public class LauncherSettingsHelper {
	public static final int ORIENTATION_SENSOR=1;
	public static final int ORIENTATION_PORTRAIT=2;
	public static final int ORIENTATION_LANDSCAPE=3;
	private static final String LAUNCHER_PREFERENCES = "launcher.preferences";
	
	public static int getDesktopOrientation(Context context) {					
		SharedPreferences sp = context.getSharedPreferences(LAUNCHER_PREFERENCES, Context.MODE_PRIVATE);
		int newD = Integer.valueOf(sp.getString("homeOrientation", context.getResources().getString(R.string.config_orientation_default)));
		return newD;     
	}
}
